CREATE EXTERNAL TABLE jms_dm.dm_forecast_dest_center_volume_detail_hi(
 waybill_no string COMMENT '运单号', 
  send_time timestamp COMMENT '发件时间', 
  send_site_code string COMMENT '发件网点code', 
  send_site_name string COMMENT '发件网点name', 
  dispatch_network_code string COMMENT '派件网点code', 
  dispatch_network_name string COMMENT '派件网点name', 
  first_code string COMMENT '一段码', 
  second_code string COMMENT '二段码', 
  dest_center_code string COMMENT '目的中心code', 
  dest_center_name string COMMENT '目的中心name', 
  planned_departure_time string COMMENT '规划发车时间', 
  duration_hours int COMMENT '当前发件网点到目的中心耗时(小时)', 
  dest_arrival_time timestamp COMMENT '目的中心预测到件时间', 
  latest_arrival_time string COMMENT '规划最晚到时间', 
  shift_time string COMMENT '散货班次时间(HH:mm)',
  entrpot_code string COMMENT '第一个集散点', 
  entrpot_name string COMMENT '第一个集散点name', 
  update_time timestamp COMMENT '更新批次时间'
  )
COMMENT '目的中心散货班次货量预测_单号明细'
PARTITIONED BY (
  dt string COMMENT '时间分区 yyyy-MM-dd-HH')
ROW FORMAT SERDE
  'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
STORED AS INPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
OUTPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION
'hdfs://yl-bg-hdp/dw/hive/jms_dm.db/external/dm_forecast_dest_center_volume_detail_hi'
;
--------------
CREATE EXTERNAL TABLE jms_dm.dm_forecast_dest_center_volume_cnt_hi(
  date_time date COMMENT '预测发件日期',
  dest_center_code string COMMENT '预测目的中心code ',
  dest_center_name string COMMENT '预测目的中心名称',
  entrpot_code string COMMENT '集散点code',
  entrpot_name string COMMENT '集散点name',
  dispatch_network_code string COMMENT '目的网点code',
  dispatch_network_name string COMMENT '目的网点name',
  shift_time string COMMENT '班次时间',
  latest_arrival_time string COMMENT '最晚到件时间',
  forecast_waybill_cnt string COMMENT '预测货量',
  actual_waybill_cnt string COMMENT '实际货量',
  update_time timestamp COMMENT '更新批次时间')
COMMENT '目的中心散货班次货量预测_汇总'
PARTITIONED BY (
  dt string COMMENT 'yyyy-MM-dd-HH')
ROW FORMAT SERDE
  'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
STORED AS INPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
OUTPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION
  'hdfs://yl-bg-hdp/dw/hive/jms_dm.db/external/dm_forecast_dest_center_volume_cnt_hi'
;